package cn.hd01.web.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.web.PageableDefault;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import cn.hd01.repository.entity.CustomerBankCard;
import cn.hd01.service.CustomerBankCardService;
import cn.hd01.web.auth.Auth;

@Controller
@RequestMapping("/customerBankCard")
@Auth
public class CustomerBankCardController {
	
	@Autowired
	private CustomerBankCardService customerBankCardService;
	
	@ResponseBody
	@RequestMapping(path = "/list", method = RequestMethod.GET)
	private Page<CustomerBankCard> find(CustomerBankCard card, @PageableDefault Pageable pageable) {
		return customerBankCardService.findAll(card, pageable); 
	}
}
